home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / ave.vim < prev    next >
Encoding:
Text File  |  2001-05-11  |  2.2 KB  |  93 lines

  1. " Vim syntax file
  2. " Copyright by Jan-Oliver Wagner
  3. " Language:    avenue
  4. " Maintainer:    Jan-Oliver Wagner <Jan-Oliver.Wagner@intevation.de>
  5. " Last change:    2001 May 10
  6.  
  7. " Avenue is the ArcView built-in language. ArcView is
  8. " a desktop GIS by ESRI. Though it is a built-in language
  9. " and a built-in editor is provided, the use of VIM increases
  10. " development speed.
  11. " I use some technologies to automatically load avenue scripts
  12. " into ArcView.
  13.  
  14. " For version 5.x: Clear all syntax items
  15. " For version 6.x: Quit when a syntax file was already loaded
  16. if version < 600
  17.   syntax clear
  18. elseif exists("b:current_syntax")
  19.   finish
  20. endif
  21.  
  22. " Avenue is entirely case-insensitive.
  23. syn case ignore
  24.  
  25. " The keywords
  26.  
  27. syn keyword aveStatement    if then elseif else end break exit return
  28. syn keyword aveStatement    for each in continue while
  29.  
  30. " String
  31.  
  32. syn region aveString        start=+"+ end=+"+
  33.  
  34. " Integer number
  35. syn match  aveNumber        "[+-]\=\<[0-9]\+\>"
  36.  
  37. " Operator
  38.  
  39. syn keyword aveOperator        or and max min xor mod by
  40. " 'not' is a kind of a problem: Its an Operator as well as a method
  41. " 'not' is only marked as an Operator if not applied as method
  42. syn match aveOperator        "[^\.]not[^a-zA-Z]"
  43.  
  44. " Variables
  45.  
  46. syn keyword aveFixVariables    av nil self false true nl tab cr tab
  47. syn match globalVariables    "_[a-zA-Z][a-zA-Z0-9]*"
  48. syn match aveVariables        "[a-zA-Z][a-zA-Z0-9_]*"
  49. syn match aveConst        "#[A-Z][A-Z_]+"
  50.  
  51. " Comments
  52.  
  53. syn match aveComment    "'.*"
  54.  
  55. " Typical Typos
  56.  
  57. " for C programmers:
  58. syn match aveTypos    "=="
  59. syn match aveTypos    "!="
  60.  
  61. " Define the default highlighting.
  62. " For version 5.7 and earlier: only when not done already
  63. " For version 5.8 and later: only when an item doesn't have highlighting+yet
  64. if version >= 508 || !exists("did_ave_syn_inits")
  65.   if version < 508
  66.     let did_ave_syn_inits = 1
  67.     command -nargs=+ HiLink hi link <args>
  68.   else
  69.     command -nargs=+ HiLink hi def link <args>
  70.   endif
  71.  
  72.   HiLink aveStatement        Statement
  73.  
  74.   HiLink aveString        String
  75.   HiLink aveNumber        Number
  76.  
  77.   HiLink aveFixVariables    Special
  78.   HiLink aveVariables        Identifier
  79.   HiLink globalVariables    Special
  80.   HiLink aveConst        Special
  81.  
  82.   HiLink aveClassMethods    Function
  83.  
  84.   HiLink aveOperator        Operator
  85.   HiLink aveComment        Comment
  86.  
  87.   HiLink aveTypos        Error
  88.  
  89.   delcommand HiLink
  90. endif
  91.  
  92. let b:current_syntax = "ave"
  93.